﻿using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Easy4net.DBUtility;
using JSMS.Model;
using Easy4net;
using Easy4net.Common;
namespace JSMS.Tests.DataBaseTest
{
    [TestClass]
    public class UnitTest1
    {
        /// <summary>
        /// 分页测试代码
        /// 
        /// </summary>
        [TestMethod]
        public void Test3()
        {
            DBHelper db = DBHelper.getInstance();
            string strSql = "select * from student ";
            ParamMap param = ParamMap.newMap();
            param.setPageParamters(1, 3);
            param.setOrderFields("studentNo",false);
            PageResult<Student> r = db.FindPage<Student>(strSql, param);
            Console.WriteLine(r.Total);
            Console.ReadLine();
            List<Student> list = r.DataList;
        }
    }
}
